package com.angel.service.ServiceImpl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.angel.bean.NoticeMater;
import com.angel.mapper.NoticeMaterDao;
import com.angel.service.NoticeMaterService;

@Service
public class NoticeMaterServiceImpl implements NoticeMaterService{

    @Resource
    private NoticeMaterDao noticeMaterDao;

    @Override
    public int insert(NoticeMater noticeMater){
        return noticeMaterDao.insert(noticeMater);
    }

    @Override
    public int insertSelective(NoticeMater noticeMater){
        return noticeMaterDao.insertSelective(noticeMater);
    }

    @Override
    public int insertList(List<NoticeMater> noticeMaters){
        return noticeMaterDao.insertList(noticeMaters);
    }

    @Override
    public int update(NoticeMater noticeMater){
        return noticeMaterDao.update(noticeMater);
    }

    @Override
    public List<NoticeMater> findNoticeMater(NoticeMater noticeMater) {
        return noticeMaterDao.findNoticeMater(noticeMater);
    }

    @Override
    public NoticeMater findOneNoticeMater(NoticeMater noticeMater) {
        List<NoticeMater> list = this.findNoticeMater(noticeMater);
        if (list==null || list.isEmpty()){
            return null;
        }
        return list.get(0);
    }

}
